
<template>
  <view class="stead_buy_container">
    <view style="width: 92%;margin: 0 auto;">
      <view style="line-height: 100rpx;font-size: 30rpx;color: #333333;">{{xq.title || ''}}</view>
      <u-parse :content="content"></u-parse>
      <!-- <editor :content="content" /> -->
      <view style="overflow: hidden;" v-if="false">
        <!-- #ifdef MP-WEIXIN -->
        <RichText :nodes="content" />
        <!-- #endif -->
        <!-- #ifdef APP-PLUS || H5 || APP-PLUS-NVUE -->
        <view v-html="content"></view>
        <!-- #endif -->
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      id: '',
      xq: {},
      content: '',
      index: ''
    }
  },
  onLoad(option) {
    this.id = option.id
    this.index = option.index
    this.xiang()
  },
  onPullDownRefresh() {
    this.xiang()

    setTimeout(function () {
      uni.stopPullDownRefresh();
    }, 1500);
  },
  // onShareAppMessage: function(e) {
  // 				// let title = '恭喜dog.东西获得成功'
  // 				let that=this
  // 				return {
  // 					title: this.xiang.title,
  // 					path:'/pages/my/wtxq?id='+that.id,
  // 					success:function(){
  // 						that.post('api/share/share','',true).then(res=>{
  // 							uni.showToast({
  // 								title: res.msg,
  // 								icon: "none",
  // 								duration: 1000
  // 							})
  // 						})
  // 					}
  // 				}
  // 			},
  methods: {
    xiang: function () {
      this.post('api/futures/brand_info', { id: this.id }, true).then(res => {
        console.log(res)
        if (res.code == 1) {
          this.xq = res.data
          this.content = res.data.purchasing_content.replace(/<img/gi, '<img class="rich-img" ')
          .replace(/<p/g, '<div')
          .replace(/\/p>/g, '\div>');
          console.log('%c [ this.content ]-65', 'font-size:13px; background:pink; color:#bf2c9f;', this.content)
        }
      })
    }
  }
}
</script>

<style lang="scss">
.rich-img {
  max-width: 100% !important;
  height: auto !important;
  // background-color: #FFFFFF;
}
page {
  background-color: #f5f5f5 !important;
  padding-top: 50rpx !important;
  font-family: Demibold;
}
</style>
<style>
.stead_buy_container /deep/ img {
  width: 100% !important;
}
</style>
